package org.jeecg.modules.sggg.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 项目表
 * @Author: jeecg-boot
 * @Date: 2023-03-30
 * @Version: V1.0
 */
@Data
@TableName("sg_item")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "sg_item对象", description = "项目表")
public class SgItem implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;
    /**
     * 所属部门
     */
    @ApiModelProperty(value = "所属部门")
    private String sysOrgCode;
    /**
     * 项目内容
     */
    @Excel(name = "项目内容", width = 15)
    @ApiModelProperty(value = "项目内容")
    private String name;
    /**
     * 项目类型id
     */
    @Excel(name = "项目类型", width = 15, dictTable = "sg_item_type", dicText = "name", dicCode = "id")
    @Dict(dictTable = "sg_item_type", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "项目类型id")
    private String itemId;
    /**
     * 健康币
     */
    @Excel(name = "健康币", width = 15)
    @ApiModelProperty(value = "健康币")
    private Integer currency;
    /**
     * 是否上架
     */
    @Excel(name = "是否上架", width = 15, dicCode = "is_on_sale")
    @Dict(dicCode = "is_on_sale")
    @ApiModelProperty(value = "是否上架")
    private Integer isOnSale;
    /**
     * 项目周期
     */
    @Excel(name = "项目周期", width = 15, dicCode = "cycle")
    @Dict(dicCode = "cycle")
    @ApiModelProperty(value = "项目周期")
    private Integer cycle;
    /**
     * 项目期次
     */
    @Excel(name = "项目期次", width = 15)
    @ApiModelProperty(value = "项目期次")
    private Integer period;
    /**
     * 项目期次
     */
    @Excel(name = "期次时间", width = 15)
    @ApiModelProperty(value = "期次时间")
    private String periodTime;
    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;

    //完成次数标记
    @TableField(exist = false)
    private Long count;

    @TableField(exist = false)//0未完成1已完成2审核中
    private Integer type;
}
